package lab02.test20;

public class Test {
    //用户从键盘输入一行含有数字和字符的字符串，程序仅仅输出字符串中的全部数字字符。
    public static void main(String[] args) {
        String result = "a3bc12";
        char tmp;
        for (int i = 0; i < result.length(); i++) {
            tmp = result.charAt(i);
            if (tmp >= '0' && tmp <= '9') {
                System.out.print(tmp);

            }
        }

    }
}
